# -*- coding: utf-8 -*-
__author__ = 'ooo'
__date__ = ' 11:55'

# Create your views here.

# 导入django库
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
from django.views.generic.base import View
from django.contrib.auth import authenticate, login, logout
from django.db.models import Q
from django.utils import timezone
from pure_pagination import Paginator, EmptyPage, PageNotAnInteger

# 导入python库
import datetime
from urllib import parse

from auser.models import Auser
from auser.forms import RegisterForm

class UserRegister(View):

    def get(self,request):
        regform = RegisterForm()
        context = {'regform':regform}
        return render(request,'user-register.html',context)

    def post(self,request):
        regform = RegisterForm(request.POST)
        if not regform.is_valid():
            context = {'regform': regform}
            return render(request, 'user-register.html', context)
        else:
            context = {}
            return render(request, 'user-register.html', context)


class UserActive(View):
    def get(self, request):
        pass

    def post(self, request):
        pass


class UserLogin(View):
    def get(self, request):
        pass

    def post(self, request):
        pass


class UserLogout(View):
    def get(self, request):
        pass

    def post(self, request):
        pass


class FindPassword(View):
    def get(self, request):
        pass

    def post(self, request):
        pass

class ResetPassword(View):
    def get(self, request):
        pass

    def post(self, request):
        pass

class ModifyPassword(View):
    def get(self, request):
        pass

    def post(self, request):
        pass

